package constraint;

public class RealDomain implements Domain {
    private double min;
    private double max;
    
    public RealDomain(double lowerBound, double upperBound) {
        min = lowerBound;
        max = upperBound;
    }
    
    public RealDomain(double singletonValue) {
        min = singletonValue;
        max = singletonValue;
    }

    public boolean isSingleton() {
        return min == max;
    }

    public int value() {
        if (isSingleton()==false) {
            System.out.println("TRYING TO GET SINGLE VALUE FROM DOMAIN!!");
        }
        return (int) min;
    }
}
